home *** CD-ROM | disk | FTP | other *** search
- Public Class frmWrite
- Inherits System.Windows.Forms.Form
- Dim WriteInProgress As Boolean
- Dim writeSpeed As Integer
- Dim speed As Integer
- Public frm As Form1
-
- #Region " Windows Form Designer generated code "
-
- Public Sub New()
- MyBase.New()
-
- 'This call is required by the Windows Form Designer.
- InitializeComponent()
-
- 'Add any initialization after the InitializeComponent() call
-
- End Sub
-
- 'Form overrides dispose to clean up the component list.
- Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
- If disposing Then
- If Not (components Is Nothing) Then
- components.Dispose()
- End If
- End If
- MyBase.Dispose(disposing)
- End Sub
-
- 'Required by the Windows Form Designer
- Private components As System.ComponentModel.IContainer
-
- 'NOTE: The following procedure is required by the Windows Form Designer
- 'It can be modified using the Windows Form Designer.
- 'Do not modify it using the code editor.
- Friend WithEvents GroupBox1 As System.Windows.Forms.GroupBox
- Friend WithEvents GroupBox2 As System.Windows.Forms.GroupBox
- Friend WithEvents GroupBox3 As System.Windows.Forms.GroupBox
- Friend WithEvents Label1 As System.Windows.Forms.Label
- Friend WithEvents speedCombo As System.Windows.Forms.ComboBox
- Friend WithEvents TestWriteCheck As System.Windows.Forms.CheckBox
- Friend WithEvents FinilizeCDCheck As System.Windows.Forms.CheckBox
- Friend WithEvents Label2 As System.Windows.Forms.Label
- Friend WithEvents OptimalSpeedCheck As System.Windows.Forms.CheckBox
- Friend WithEvents ProgressBar3 As System.Windows.Forms.ProgressBar
- Friend WithEvents optJoliet As System.Windows.Forms.RadioButton
- Friend WithEvents optISOLevel1 As System.Windows.Forms.RadioButton
- Friend WithEvents optISOLevel2 As System.Windows.Forms.RadioButton
- Friend WithEvents Label3 As System.Windows.Forms.Label
- Friend WithEvents txtDiscLabel As System.Windows.Forms.TextBox
- Friend WithEvents optDataMode1 As System.Windows.Forms.RadioButton
- Friend WithEvents optDataMode2 As System.Windows.Forms.RadioButton
- Friend WithEvents frmProgress As System.Windows.Forms.GroupBox
- Friend WithEvents WriteBtn As System.Windows.Forms.Button
- Friend WithEvents CancelBtn As System.Windows.Forms.Button
- Friend WithEvents Label4 As System.Windows.Forms.Label
- Friend WithEvents Label5 As System.Windows.Forms.Label
- Friend WithEvents Label6 As System.Windows.Forms.Label
- Friend WithEvents Label7 As System.Windows.Forms.Label
- Friend WithEvents driveStatusLbl As System.Windows.Forms.Label
- Friend WithEvents driveBufferLbl As System.Windows.Forms.Label
- Friend WithEvents driveEstBlocksLbl As System.Windows.Forms.Label
- Friend WithEvents driveWritedBlocksLbl As System.Windows.Forms.Label
- Friend WithEvents ProgressBar2 As System.Windows.Forms.ProgressBar
- Friend WithEvents ProgressBar1 As System.Windows.Forms.ProgressBar
- Friend WithEvents ProgressLbl As System.Windows.Forms.Label
- Friend WithEvents Label9 As System.Windows.Forms.Label
- <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
- Me.GroupBox1 = New System.Windows.Forms.GroupBox()
- Me.ProgressBar3 = New System.Windows.Forms.ProgressBar()
- Me.OptimalSpeedCheck = New System.Windows.Forms.CheckBox()
- Me.Label2 = New System.Windows.Forms.Label()
- Me.FinilizeCDCheck = New System.Windows.Forms.CheckBox()
- Me.TestWriteCheck = New System.Windows.Forms.CheckBox()
- Me.speedCombo = New System.Windows.Forms.ComboBox()
- Me.Label1 = New System.Windows.Forms.Label()
- Me.GroupBox2 = New System.Windows.Forms.GroupBox()
- Me.txtDiscLabel = New System.Windows.Forms.TextBox()
- Me.Label3 = New System.Windows.Forms.Label()
- Me.optISOLevel2 = New System.Windows.Forms.RadioButton()
- Me.optISOLevel1 = New System.Windows.Forms.RadioButton()
- Me.optJoliet = New System.Windows.Forms.RadioButton()
- Me.GroupBox3 = New System.Windows.Forms.GroupBox()
- Me.optDataMode2 = New System.Windows.Forms.RadioButton()
- Me.optDataMode1 = New System.Windows.Forms.RadioButton()
- Me.frmProgress = New System.Windows.Forms.GroupBox()
- Me.Label9 = New System.Windows.Forms.Label()
- Me.ProgressLbl = New System.Windows.Forms.Label()
- Me.ProgressBar1 = New System.Windows.Forms.ProgressBar()
- Me.ProgressBar2 = New System.Windows.Forms.ProgressBar()
- Me.driveWritedBlocksLbl = New System.Windows.Forms.Label()
- Me.driveEstBlocksLbl = New System.Windows.Forms.Label()
- Me.driveBufferLbl = New System.Windows.Forms.Label()
- Me.driveStatusLbl = New System.Windows.Forms.Label()
- Me.Label7 = New System.Windows.Forms.Label()
- Me.Label6 = New System.Windows.Forms.Label()
- Me.Label5 = New System.Windows.Forms.Label()
- Me.Label4 = New System.Windows.Forms.Label()
- Me.WriteBtn = New System.Windows.Forms.Button()
- Me.CancelBtn = New System.Windows.Forms.Button()
- Me.GroupBox1.SuspendLayout()
- Me.GroupBox2.SuspendLayout()
- Me.GroupBox3.SuspendLayout()
- Me.frmProgress.SuspendLayout()
- Me.SuspendLayout()
- '
- 'GroupBox1
- '
- Me.GroupBox1.Controls.AddRange(New System.Windows.Forms.Control() {Me.ProgressBar3, Me.OptimalSpeedCheck, Me.Label2, Me.FinilizeCDCheck, Me.TestWriteCheck, Me.speedCombo, Me.Label1})
- Me.GroupBox1.Location = New System.Drawing.Point(6, 6)
- Me.GroupBox1.Name = "GroupBox1"
- Me.GroupBox1.Size = New System.Drawing.Size(168, 205)
- Me.GroupBox1.TabIndex = 0
- Me.GroupBox1.TabStop = False
- Me.GroupBox1.Text = "Burn Options"
- '
- 'ProgressBar3
- '
- Me.ProgressBar3.Location = New System.Drawing.Point(3, 195)
- Me.ProgressBar3.Maximum = 64
- Me.ProgressBar3.Minimum = 1
- Me.ProgressBar3.Name = "ProgressBar3"
- Me.ProgressBar3.Size = New System.Drawing.Size(164, 8)
- Me.ProgressBar3.TabIndex = 6
- Me.ProgressBar3.Value = 1
- Me.ProgressBar3.Visible = False
- '
- 'OptimalSpeedCheck
- '
- Me.OptimalSpeedCheck.Location = New System.Drawing.Point(147, 174)
- Me.OptimalSpeedCheck.Name = "OptimalSpeedCheck"
- Me.OptimalSpeedCheck.Size = New System.Drawing.Size(15, 14)
- Me.OptimalSpeedCheck.TabIndex = 5
- Me.OptimalSpeedCheck.Text = "CheckBox1"
- '
- 'Label2
- '
- Me.Label2.Location = New System.Drawing.Point(11, 175)
- Me.Label2.Name = "Label2"
- Me.Label2.Size = New System.Drawing.Size(124, 15)
- Me.Label2.TabIndex = 4
- Me.Label2.Text = "Detect Speed Optimals:"
- '
- 'FinilizeCDCheck
- '
- Me.FinilizeCDCheck.Location = New System.Drawing.Point(12, 98)
- Me.FinilizeCDCheck.Name = "FinilizeCDCheck"
- Me.FinilizeCDCheck.Size = New System.Drawing.Size(88, 20)
- Me.FinilizeCDCheck.TabIndex = 3
- Me.FinilizeCDCheck.Text = "Finalise Disc"
- '
- 'TestWriteCheck
- '
- Me.TestWriteCheck.Location = New System.Drawing.Point(12, 74)
- Me.TestWriteCheck.Name = "TestWriteCheck"
- Me.TestWriteCheck.Size = New System.Drawing.Size(87, 17)
- Me.TestWriteCheck.TabIndex = 2
- Me.TestWriteCheck.Text = "Test Write"
- '
- 'speedCombo
- '
- Me.speedCombo.Location = New System.Drawing.Point(57, 33)
- Me.speedCombo.Name = "speedCombo"
- Me.speedCombo.Size = New System.Drawing.Size(105, 21)
- Me.speedCombo.TabIndex = 1
- Me.speedCombo.Text = "Speed"
- '
- 'Label1
- '
- Me.Label1.Location = New System.Drawing.Point(13, 34)
- Me.Label1.Name = "Label1"
- Me.Label1.Size = New System.Drawing.Size(44, 18)
- Me.Label1.TabIndex = 0
- Me.Label1.Text = "Speed:"
- '
- 'GroupBox2
- '
- Me.GroupBox2.Controls.AddRange(New System.Windows.Forms.Control() {Me.txtDiscLabel, Me.Label3, Me.optISOLevel2, Me.optISOLevel1, Me.optJoliet})
- Me.GroupBox2.Location = New System.Drawing.Point(175, 6)
- Me.GroupBox2.Name = "GroupBox2"
- Me.GroupBox2.Size = New System.Drawing.Size(332, 146)
- Me.GroupBox2.TabIndex = 1
- Me.GroupBox2.TabStop = False
- Me.GroupBox2.Text = "Disc Compilation"
- '
- 'txtDiscLabel
- '
- Me.txtDiscLabel.Location = New System.Drawing.Point(83, 113)
- Me.txtDiscLabel.Name = "txtDiscLabel"
- Me.txtDiscLabel.Size = New System.Drawing.Size(240, 20)
- Me.txtDiscLabel.TabIndex = 4
- Me.txtDiscLabel.Text = "New Disc"
- Me.txtDiscLabel.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
- '
- 'Label3
- '
- Me.Label3.Location = New System.Drawing.Point(14, 116)
- Me.Label3.Name = "Label3"
- Me.Label3.Size = New System.Drawing.Size(61, 18)
- Me.Label3.TabIndex = 3
- Me.Label3.Text = "Disc Label:"
- '
- 'optISOLevel2
- '
- Me.optISOLevel2.Location = New System.Drawing.Point(14, 81)
- Me.optISOLevel2.Name = "optISOLevel2"
- Me.optISOLevel2.Size = New System.Drawing.Size(308, 19)
- Me.optISOLevel2.TabIndex = 2
- Me.optISOLevel2.Text = "ISO Level 2 (Maximum 31 chars)"
- '
- 'optISOLevel1
- '
- Me.optISOLevel1.Location = New System.Drawing.Point(14, 57)
- Me.optISOLevel1.Name = "optISOLevel1"
- Me.optISOLevel1.Size = New System.Drawing.Size(307, 17)
- Me.optISOLevel1.TabIndex = 1
- Me.optISOLevel1.Text = "ISO Level 1 (Maximum 11 = 8 + 3 chars)"
- '
- 'optJoliet
- '
- Me.optJoliet.Checked = True
- Me.optJoliet.Location = New System.Drawing.Point(13, 33)
- Me.optJoliet.Name = "optJoliet"
- Me.optJoliet.Size = New System.Drawing.Size(309, 16)
- Me.optJoliet.TabIndex = 0
- Me.optJoliet.TabStop = True
- Me.optJoliet.Text = "Joliet (Multilanguage Support)"
- '
- 'GroupBox3
- '
- Me.GroupBox3.Controls.AddRange(New System.Windows.Forms.Control() {Me.optDataMode2, Me.optDataMode1})
- Me.GroupBox3.Location = New System.Drawing.Point(176, 159)
- Me.GroupBox3.Name = "GroupBox3"
- Me.GroupBox3.Size = New System.Drawing.Size(335, 52)
- Me.GroupBox3.TabIndex = 2
- Me.GroupBox3.TabStop = False
- Me.GroupBox3.Text = "Format"
- '
- 'optDataMode2
- '
- Me.optDataMode2.Location = New System.Drawing.Point(183, 26)
- Me.optDataMode2.Name = "optDataMode2"
- Me.optDataMode2.Size = New System.Drawing.Size(143, 16)
- Me.optDataMode2.TabIndex = 1
- Me.optDataMode2.Text = "Data Mode 2/XA"
- '
- 'optDataMode1
- '
- Me.optDataMode1.Checked = True
- Me.optDataMode1.Location = New System.Drawing.Point(17, 24)
- Me.optDataMode1.Name = "optDataMode1"
- Me.optDataMode1.Size = New System.Drawing.Size(118, 18)
- Me.optDataMode1.TabIndex = 0
- Me.optDataMode1.TabStop = True
- Me.optDataMode1.Text = "Data Mode 1"
- '
- 'frmProgress
- '
- Me.frmProgress.Controls.AddRange(New System.Windows.Forms.Control() {Me.Label9, Me.ProgressLbl, Me.ProgressBar1, Me.ProgressBar2, Me.driveWritedBlocksLbl, Me.driveEstBlocksLbl, Me.driveBufferLbl, Me.driveStatusLbl, Me.Label7, Me.Label6, Me.Label5, Me.Label4})
- Me.frmProgress.Location = New System.Drawing.Point(6, 221)
- Me.frmProgress.Name = "frmProgress"
- Me.frmProgress.Size = New System.Drawing.Size(622, 116)
- Me.frmProgress.TabIndex = 3
- Me.frmProgress.TabStop = False
- Me.frmProgress.Text = "Progress"
- '
- 'Label9
- '
- Me.Label9.Location = New System.Drawing.Point(12, 92)
- Me.Label9.Name = "Label9"
- Me.Label9.Size = New System.Drawing.Size(97, 16)
- Me.Label9.TabIndex = 11
- Me.Label9.Text = "Disk Total:"
- '
- 'ProgressLbl
- '
- Me.ProgressLbl.Location = New System.Drawing.Point(12, 74)
- Me.ProgressLbl.Name = "ProgressLbl"
- Me.ProgressLbl.Size = New System.Drawing.Size(97, 16)
- Me.ProgressLbl.TabIndex = 10
- Me.ProgressLbl.Text = "Write:"
- '
- 'ProgressBar1
- '
- Me.ProgressBar1.Location = New System.Drawing.Point(121, 95)
- Me.ProgressBar1.Name = "ProgressBar1"
- Me.ProgressBar1.Size = New System.Drawing.Size(495, 15)
- Me.ProgressBar1.TabIndex = 9
- '
- 'ProgressBar2
- '
- Me.ProgressBar2.Location = New System.Drawing.Point(121, 74)
- Me.ProgressBar2.Name = "ProgressBar2"
- Me.ProgressBar2.Size = New System.Drawing.Size(494, 15)
- Me.ProgressBar2.TabIndex = 8
- '
- 'driveWritedBlocksLbl
- '
- Me.driveWritedBlocksLbl.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
- Me.driveWritedBlocksLbl.Location = New System.Drawing.Point(510, 46)
- Me.driveWritedBlocksLbl.Name = "driveWritedBlocksLbl"
- Me.driveWritedBlocksLbl.Size = New System.Drawing.Size(104, 18)
- Me.driveWritedBlocksLbl.TabIndex = 7
- Me.driveWritedBlocksLbl.Text = "0"
- Me.driveWritedBlocksLbl.TextAlign = System.Drawing.ContentAlignment.MiddleRight
- '
- 'driveEstBlocksLbl
- '
- Me.driveEstBlocksLbl.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
- Me.driveEstBlocksLbl.Location = New System.Drawing.Point(510, 22)
- Me.driveEstBlocksLbl.Name = "driveEstBlocksLbl"
- Me.driveEstBlocksLbl.Size = New System.Drawing.Size(104, 18)
- Me.driveEstBlocksLbl.TabIndex = 6
- Me.driveEstBlocksLbl.Text = "0"
- Me.driveEstBlocksLbl.TextAlign = System.Drawing.ContentAlignment.MiddleRight
- '
- 'driveBufferLbl
- '
- Me.driveBufferLbl.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
- Me.driveBufferLbl.Location = New System.Drawing.Point(120, 48)
- Me.driveBufferLbl.Name = "driveBufferLbl"
- Me.driveBufferLbl.Size = New System.Drawing.Size(104, 18)
- Me.driveBufferLbl.TabIndex = 5
- Me.driveBufferLbl.Text = "0"
- Me.driveBufferLbl.TextAlign = System.Drawing.ContentAlignment.MiddleRight
- '
- 'driveStatusLbl
- '
- Me.driveStatusLbl.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
- Me.driveStatusLbl.Location = New System.Drawing.Point(120, 24)
- Me.driveStatusLbl.Name = "driveStatusLbl"
- Me.driveStatusLbl.Size = New System.Drawing.Size(104, 18)
- Me.driveStatusLbl.TabIndex = 4
- Me.driveStatusLbl.Text = "Idle"
- Me.driveStatusLbl.TextAlign = System.Drawing.ContentAlignment.MiddleRight
- '
- 'Label7
- '
- Me.Label7.Location = New System.Drawing.Point(397, 50)
- Me.Label7.Name = "Label7"
- Me.Label7.Size = New System.Drawing.Size(106, 16)
- Me.Label7.TabIndex = 3
- Me.Label7.Text = "Current Block:"
- '
- 'Label6
- '
- Me.Label6.Location = New System.Drawing.Point(397, 24)
- Me.Label6.Name = "Label6"
- Me.Label6.Size = New System.Drawing.Size(105, 16)
- Me.Label6.TabIndex = 2
- Me.Label6.Text = "Estimated Blocks:"
- '
- 'Label5
- '
- Me.Label5.Location = New System.Drawing.Point(11, 46)
- Me.Label5.Name = "Label5"
- Me.Label5.Size = New System.Drawing.Size(97, 18)
- Me.Label5.TabIndex = 1
- Me.Label5.Text = "Buffer (%):"
- '
- 'Label4
- '
- Me.Label4.Location = New System.Drawing.Point(11, 22)
- Me.Label4.Name = "Label4"
- Me.Label4.Size = New System.Drawing.Size(97, 16)
- Me.Label4.TabIndex = 0
- Me.Label4.Text = "Drive Status:"
- '
- 'WriteBtn
- '
- Me.WriteBtn.Location = New System.Drawing.Point(520, 9)
- Me.WriteBtn.Name = "WriteBtn"
- Me.WriteBtn.Size = New System.Drawing.Size(96, 23)
- Me.WriteBtn.TabIndex = 4
- Me.WriteBtn.Text = "Write"
- '
- 'CancelBtn
- '
- Me.CancelBtn.Location = New System.Drawing.Point(520, 37)
- Me.CancelBtn.Name = "CancelBtn"
- Me.CancelBtn.Size = New System.Drawing.Size(96, 23)
- Me.CancelBtn.TabIndex = 5
- Me.CancelBtn.Text = "Cancel"
- '
- 'frmWrite
- '
- Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
- Me.ClientSize = New System.Drawing.Size(631, 342)
- Me.ControlBox = False
- Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.CancelBtn, Me.WriteBtn, Me.frmProgress, Me.GroupBox3, Me.GroupBox2, Me.GroupBox1})
- Me.Name = "frmWrite"
- Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
- Me.Text = "frmWrite"
- Me.GroupBox1.ResumeLayout(False)
- Me.GroupBox2.ResumeLayout(False)
- Me.GroupBox3.ResumeLayout(False)
- Me.frmProgress.ResumeLayout(False)
- Me.ResumeLayout(False)
-
- End Sub
-
- #End Region
-
- Private Sub frmWrite_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
- frm = Me.Owner
- frm.frmWrite1 = Me
- writeSpeed = frm.DataCDWriter1.driveMaxWSpeed
- WriteInProgress = False
- LoadSpeedCombo()
- End Sub
-
- Private Sub optISOLevel1_Click()
- frm.DataCDWriter1.volumeFileSystem = NCTDISCWRITERLib.FILE_SYSTEM.ISO_LEVEL_1
- End Sub
-
- Private Sub optISOLevel2_Click()
- frm.DataCDWriter1.volumeFileSystem = NCTDISCWRITERLib.FILE_SYSTEM.ISO_LEVEL_2
- End Sub
-
- Private Sub optJoliet_Click()
- frm.DataCDWriter1.volumeFileSystem = NCTDISCWRITERLib.FILE_SYSTEM.JOLIET
- End Sub
-
- Public Sub OperationProgress(ByVal Percent As Integer)
- If frm.err = True Or WriteInProgress = False Then
- driveStatusLbl.Text = "Idle"
- StopWrite()
- Exit Sub
- End If
-
- Select Case frm.DataCDWriter1.driveOperation
- Case NCTDISCWRITERLib.OPERATION.WRITE_DISC
- Select Case frm.DataCDWriter1.writePhase
- Case NCTDISCWRITERLib.WRITE_PHASE.FILL_BUFFER
- driveStatusLbl.Text = "Fill Buffer..."
- Case NCTDISCWRITERLib.WRITE_PHASE.WRITE_TRACK
- driveStatusLbl.Text = "Write Track..."
- Case NCTDISCWRITERLib.WRITE_PHASE.CLOSE_TRACK
- driveStatusLbl.Text = "Close Track..."
- End Select
- ProgressBar1.Value = Percent * 2 / 3
- ProgressBar2.Value = Percent
- driveEstBlocksLbl.Text = frm.DataCDWriter1.writeTotalBlocks
- driveWritedBlocksLbl.Text = frm.DataCDWriter1.writeCurrentBlock
- driveBufferLbl.Text = frm.DataCDWriter1.driveBufferUsagePercent
- Case NCTDISCWRITERLib.OPERATION.FINALIZE_DISC
- driveStatusLbl.Text = "Finalise Disc..."
- ProgressLbl.Text = "Finalise:"
- CancelBtn.Enabled = False
- ProgressBar1.Value = 100 * 2 / 3 + Percent / 3 - 5
- ProgressBar2.Value = Percent
- driveWritedBlocksLbl.Text = frm.DataCDWriter1.writeCurrentBlock
- If Percent = 100 Then
- ProgressBar2.Value = 100
- ProgressBar1.Value = 100
- driveStatusLbl.Text = "Idle"
- MsgBox("Write Complete!")
- StopWrite()
- Exit Sub
- End If
- End Select
-
- Application.DoEvents()
- End Sub
- Private Sub StopWrite()
- ProgressLbl.Text = "Write Tracks:"
- driveEstBlocksLbl.Text = 0
- driveWritedBlocksLbl.Text = 0
- driveBufferLbl.Text = 0
- ProgressBar1.Value = 0
- ProgressBar2.Value = 0
- frm.RefreshDiskInfo()
- WriteInProgress = False
- WriteBtn.Enabled = True
- CancelBtn.Enabled = True
- frm.err = False
- Active()
- End Sub
-
- Private Sub speedCombo_Click()
- Dim idx As Integer
-
- idx = speedCombo.SelectedIndex
- speed = speedCombo.Items.Item(idx)
- frm.DataCDWriter1.writeSpeed = speed
- End Sub
-
- Private Sub Inactive()
- OptimalSpeedCheck.Enabled = False
- speedCombo.Enabled = False
- WriteBtn.Enabled = False
- optJoliet.Enabled = False
- optISOLevel1.Enabled = False
- optISOLevel2.Enabled = False
- txtDiscLabel.Enabled = False
- TestWriteCheck.Enabled = False
- FinilizeCDCheck.Enabled = False
- optDataMode1.Enabled = False
- optDataMode2.Enabled = False
-
-
- End Sub
-
- Private Sub Active()
- speedCombo.Enabled = True
- WriteBtn.Enabled = True
- optJoliet.Enabled = True
- optISOLevel1.Enabled = True
- optISOLevel2.Enabled = True
- txtDiscLabel.Enabled = True
- TestWriteCheck.Enabled = True
- FinilizeCDCheck.Enabled = True
- optDataMode1.Enabled = True
- optDataMode2.Enabled = True
- OptimalSpeedCheck.Enabled = True
-
- End Sub
-
- Private Sub CancelBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CancelBtn.Click
- If WriteInProgress = True Then
- frm.DataCDWriter1.StopWrite()
- driveStatusLbl.Text = "Idle"
- StopWrite()
- Else
- Me.Hide()
- End If
- End Sub
-
- Public Sub LoadSpeedCombo()
-
- speedCombo.Items.Clear()
- ProgressBar3.Visible = True
-
- If OptimalSpeedCheck.Checked <> 0 Then
- For speed = 64 To 1 Step -1
- frm.DataCDWriter1.writeSpeed = speed
- ProgressBar3.Value = 65 - speed
- If frm.DataCDWriter1.writeSpeed = speed Then
- speedCombo.Items.Add(speed)
- End If
- Next
- Else
- For speed = frm.DataCDWriter1.driveMaxWSpeed To 1 Step -2
- speedCombo.Items.Add(speed)
- Next
- End If
-
- If speedCombo.Items.Count() > 0 Then
- speedCombo.SelectedIndex = 0
- End If
-
- ProgressBar3.Value = 1
- ProgressBar3.Visible = False
-
- End Sub
-
- Private Sub OptimalSpeedCheck_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OptimalSpeedCheck.CheckedChanged
- LoadSpeedCombo()
- End Sub
-
- Private Sub WriteBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles WriteBtn.Click
- Dim test As Boolean
- Dim finalize As Boolean
- Dim idx As Integer
-
- Inactive()
-
- idx = 0
- speed = speedCombo.Items.Item(idx)
- frm.DataCDWriter1.writeSpeed = speed
- frm.DataCDWriter1.volumeLabel = txtDiscLabel.Text
-
- driveStatusLbl.Text = "Prepare..."
- Me.Refresh()
-
- WriteBtn.Enabled = False
- Me.Refresh()
-
- If TestWriteCheck.Checked = 0 Then
- frm.DataCDWriter1.writeSimulate = False
- Else
- frm.DataCDWriter1.writeSimulate = True
- End If
- If FinilizeCDCheck.Checked = 0 Then
- frm.DataCDWriter1.writeFinalizeCD = False
- Else
- frm.DataCDWriter1.writeFinalizeCD = True
- End If
-
- frm.err = False
- Me.Refresh()
-
- idx = speedCombo.SelectedIndex
- speed = speedCombo.Items.Item(idx)
- frm.DataCDWriter1.writeSpeed = speed
-
- frm.OperationProgress = False
- frm.writeProgress = 0
- frm.DataCDWriter1.StartWrite()
- If frm.err = True Then
- driveStatusLbl.Text = "Idle"
- StopWrite()
- frm.err = False
- Else
- WriteInProgress = True
- End If
- End Sub
- End Class
-